﻿using Blog.Core.Model.ViewModels;
using Microsoft.AspNetCore.Mvc;
using RxxApi.Common.Helper;
using RxxApi.Extensions.Authorizations;
using RxxApi.IServices.System;
using RxxApi.Model;
using RxxApi.Model.Dto;
using RxxApi.Model.Entity;
using RxxApi.Services.System;
using System.Security.Claims;

namespace RxxApi.Api.Controllers.System;
/// <summary>
/// 菜单管理
/// </summary>
public class SysMenuController : BaseApiController
{
    private readonly ISysMenuService _sysMenuService;

    public SysMenuController(ISysMenuService sysMenuService)
    {
        _sysMenuService = sysMenuService;
    }

    [HttpGet]
    public async Task<MessageModel<List<SysMenu>>> GetUserMenu(long uid)
    {
        return Success(await _sysMenuService.GetMenuInfoByUserId(uid));
    }
}
